import request from '@/utils/request'
import { getServicePath } from '@/api/baseUrlConfig'
const servicePath = getServicePath()

// 查询党员信息列表
export function queryTreeByCondition (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + '/party-member-info-mgmt/queryTreeByCondition',
    method: 'get',
    params: data
  })
}
// 查询党员信息列表
export function queryById (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + `/party-member-info-mgmt/queryById/${data.id}`,
    method: 'get',
    params: data
  })
}

// 新增党员信息
export function add (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + '/party-member-info-mgmt/add',
    method: 'post',
    data
  })
}

// 编辑党员信息
export function edit (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + '/party-member-info-mgmt/edit',
    method: 'post',
    data
  })
}

// 删除党员信息
export function deleteById (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + `/party-member-info-mgmt/deleteById/${data.id}`,
    method: 'get',
    params: data
  })
}

// 查询党内职位列表
export function queryPositionsList (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + `/party-positions/queryList`,
    method: 'get',
    params: data
  })
}

// 查询职位级别列表
export function queryPositionsLevelList (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + `/position-level/queryList`,
    method: 'get',
    params: data
  })
}
